<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@include file="/common/common.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basepath", basePath);
	
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/common/commoncss.jsp"></jsp:include>
<script type="text/javascript" src="js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/custom/zh_CN/main.js"></script>
<link type="text/css" href="js/calendar/css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/calendar/zh_CN/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/calendar/zh_CN/timepicker.js"></script>
<script type="text/javascript" src="js/custom/common.js"></script>
<script language="javascript">
/**页面加载的时候，初始化时间控件**/
var time=0;
var sit;
$(function() {
	dateval("eff",true);
	dateval("exp", true);
	dateval("datemonth", false);
	});

function tongji(){
	$("#Submit").attr("disabled",true);
	sit=setInterval("timeShow()", 1000);
	$.ajax({
		url:'dataBaseTranplatAction!DoSql',
		data:{'sql':$('#CreatSql').html()},
		dataType:'text',
		type:'post',
		error:function(){
			$("#timeshow").html("执行失败，本次统计执行"+time+"秒");
			clearInterval(sit);
			$("#Submit").attr("disabled",false);
			time=0;
		},
		success:function(data){
			eval('var list=' +data);
			var num=list.total;
			$("#timeshow").html("执行完成，本次统计执行"+time+"秒"+"成功执行"+num+"条");
			clearInterval(sit);
			time=0;
			$("#Submit").attr("disabled",false);
		}
	});
}
function timeShow(){
	time=time+1;
	$("#timeshow").html("正在执行统计,请稍后。。。。。已经执行"+time+"秒");
	
}

</script>
</HEAD>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" style="border:0;overflow-x:hidden;background-color:#EFEFEF;">
<div class="byt_table" style="width:98.3%;height:75%;overflow:auto;margin-top:0px;">
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th colspan="2" >数据移植   <span style="font-size: 12px" class="flag_red">*温馨提示，插入之前，请先删除表中对应日期的数据,(删除和插入请分别执行)</span></th>
		</tr>
	</thead>
  	  <tr>
        <th width="30%">设备健康状态样例： </th>
        <td width="70%" > <textarea readonly style="width:95%;height:50px" name="Remark" id="Remark">${map.health}</textarea></td>
       
      </tr>
     <tr>
        <th width="30%">保养提示样例： </th>
        <td width="70%" > <textarea readonly style="width:95%;height:70px" name="Remark" id="Remark">${map.maintTip}</textarea></td>
       
      </tr>
       <tr>
        <th width="37%">保养预测样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:80px" name="Remark" id="Remark">${map.maintForst}</textarea></td>
       
      </tr>
     <tr>
        <th width="37%">参数未统计样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:50px" name="Remark" id="Remark">${map.VclNoCollectParam}</textarea></td>
       </tr>
       <tr>
        <th width="37%">频率样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:50px" name="Remark" id="Remark">${map.VclCollectFre}</textarea></td>
       
      </tr>
     <tr>
        <th width="37%">档位及车速样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:50px" name="Remark" id="Remark">${map.DB2OfVcl}</textarea></td>
        </tr>
        <tr>
        <th width="37%">工作循环区域样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:50px" name="Remark" id="Remark">${map.DCFZOfVcl}</textarea></td>
       
      </tr>
     <tr>
        <th width="37%">载重率为空样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:50px" style="width:95%;height:50px" name="Remark" id="Remark">${map.LoadRateOfVcl}</textarea></td>
      </tr>
      <tr>
        <th width="37%">里程选择不正确样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:70px" name="Remark" id="Remark">${map.RunKmOfVcl}</textarea></td>
      </tr>
      <tr>
        <th width="37%">时效统计样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:80px" name="Remark" id="Remark">${map.EffState}</textarea></td>
      </tr>
      <tr>
        <th width="37%">档位及车速样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:70px" name="Remark" id="Remark">${map.vcldb2}</textarea></td>
      </tr>
      <tr>
        <th width="37%">道路信息样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:50px" name="Remark" id="Remark">${map.RoadInfo}</textarea></td>
      </tr>
      <tr>
        <th width="37%">油门开度样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:80px" name="Remark" id="Remark">${map.OilSwitchOpe}</textarea></td>
      </tr>
      <tr>
        <th width="37%">路况值改变样例： </th>
        <td width="63%" > <textarea readonly style="width:95%;height:80px" name="Remark" id="Remark">${map.RoadChangeStat}</textarea></td>
      </tr>
      <tr>
      <th width="37%">需要执行的sql: </th>
        <td width="63%" > <textarea  style="width:95%;height:100px" name="CreatSql" id="CreatSql"></textarea></td>
      </tr>
      
</table>
<div class="button_center"> 
		<input type="button"  name="Submit" id="Submit" onclick="tongji()" value="手动执行统计"/>
</div>
<div> 
<span id="timeshow"></span>
</div>
</div>
</body>
</HTML>
